Optimal. Leaf size=159 \[ \frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {2 B \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.37, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3601, 3564, 135, 133, 3599, 67, 65} \[ \frac {a (A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {2 B \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 67
Rule 133
Rule 135
Rule 3564
Rule 3599
Rule 3601
Rubi steps
\begin {align*} \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx &=-\left ((-A+i B) \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx\right )+\frac {(i B) \int \tan ^m(c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx}{a}\\ &=\frac {(i a B) \operatorname {Subst}\left (\int \frac {x^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (a^2 (i A+B)\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {a+x} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {\left (i a B (-i \tan (c+d x))^{-m} \tan ^m(c+d x)\right ) \operatorname {Subst}\left (\int \frac {(-i x)^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (a^2 (i A+B) \sqrt {1+i \tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {1+\frac {x}{a}} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{d \sqrt {a+i a \tan (c+d x)}}\\ &=\frac {a (A-i B) F_1\left (1+m;\frac {1}{2},1;2+m;-i \tan (c+d x),i \tan (c+d x)\right ) \sqrt {1+i \tan (c+d x)} \tan ^{1+m}(c+d x)}{d (1+m) \sqrt {a+i a \tan (c+d x)}}+\frac {2 B \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};1+i \tan (c+d x)\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 4.22, size = 0, normalized size = 0.00 \[ \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.71, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\sqrt {2} {\left ({\left (A - i \, B\right )} e^{\left (3 i \, d x + 3 i \, c\right )} + {\left (A + i \, B\right )} e^{\left (i \, d x + i \, c\right )}\right )} \left (\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} \sqrt {i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.89, size = 0, normalized size = 0.00 \[ \int \left (\tan ^{m}\left (d x +c \right )\right ) \sqrt {a +i a \tan \left (d x +c \right )}\, \left (A +B \tan \left (d x +c \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} \sqrt {i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________